<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>${(PageTitle)!'title'}</title>
    <meta name="description" content="这是一个form页面">
    <meta name="keywords" content="form">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/assets/css/admin.css">
    <link href="/kindeditor/themes/default/default.css" rel="stylesheet" />
    <script src="/kindeditor/kindeditor-all.js"></script>
    <script src="/cjwJs/kindEditor.js"></script>
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<header class="am-topbar admin-header">
    <div class="am-topbar-brand">
        <strong>${systemTitle}</strong>
        <small>${systemSubtitle}</small>
        <!--<button id="test2">小小提示层2</button>-->
        <!--<button id="coverSelection" onClick="selectImage()">选择封面图片</button>-->
    </div>

    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
            class="am-icon-bars"></span></button>

    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
            <li><a href="javascript:;"><span class="am-icon-envelope-o"></span> 收件箱 <span
                    class="am-badge am-badge-warning">5</span></a></li>
            <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                    <span class="am-icon-users"></span> 管理员 <span class="am-icon-caret-down"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li id="changePassword"><a href="#"><span class="am-icon-user"></span> 修改密码</a></li>
                    <li><a href="/bk/user/logout/"><span class="am-icon-power-off"></span> 退出</a></li>
                </ul>
            </li>

        </ul>
    </div>
</header>

<div class="am-cf admin-main">
    <!-- sidebar start -->
    <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
        <div class="am-offcanvas-bar admin-offcanvas-bar">
            <ul class="am-list admin-sidebar-list">
                <#list slider as item>
                    <li><a href="${item.link}"><span class="am-icon-sign-out"></span> ${item.title}</a></li>
                </#list>
            </ul>
        </div>
    </div>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">${title}</strong> /
                <small>${subtitle}</small>
            </div>
        </div>

        <div class="am-tabs am-margin" data-am-tabs>
            <div class="am-tab-panel am-active" id="tab1">
                <form class="am-form" method="post" enctype="multipart/form-data" action="${action}">
                    <div hidden>
                        <input type="text" class="am-input-sm" value="${(info.id)!''}" name="bkBranchOffice.id">
                    </div>

                    <!--<div class="am-g am-margin-top-sm">-->
                        <!--<div class="am-u-sm-4 am-u-md-2 am-text-right">-->
                            <!--封面图片-->
                        <!--</div>-->
                        <!--<div class="am-u-sm-8 am-u-md-4 am-u-end">-->
                            <!--<img id="coverImage" src="${(info.image)!''}" style="max-width: 200px;max-height: 100px;"/>-->
                            <!--<br>-->
                            <!--&lt;!&ndash;<input id="title" type="text" class="am-input-sm" name="pxlmWxNews.title" value="${(info.title)!''}">&ndash;&gt;-->
                            <!--<button id="coverSelection" onClick="return selectImage()">选择封面图片</button>-->
                        <!--</div>-->
                    <!--</div>-->

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            分店店名
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <input type="text" class="am-input-sm" name="bkBranchOffice.name" value="${(info.name)!''}">
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            地址
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <input type="text" class="am-input-sm" name="bkBranchOffice.address" value="${(info.address)!''}">
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            电话
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <input type="text" class="am-input-sm" name="bkBranchOffice.phone" value="${(info.phone)!''}">
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            简介
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <textarea rows="4" name="bkBranchOffice.intro"
                                      value="${(info.intro)!''}">${(info.intro)!''}</textarea>
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            营业时间${(info.start_time)!'x'}
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <select data-am-selected="{justify: '#doc-dropdown-justify',btnSize: 'sm',dropUp: 1}" name="bkBranchOffice.start_time">
                                <#if info??>
                                    <#list times as time>
                                        <#if (time.index = info.start_time)>
                                            <option value="${time.index}" selected>${(time.str)!'未填写'}</option>
                                        </#if>
                                        <#if (time.index != info.start_time)>
                                            <option value="${time.index}">${(time.str)!'未填写'}</option>
                                        </#if>
                                    </#list>
                                </#if>
                                <#if !info??>
                                    <#list times as time>
                                        <option value="${time.index}">${(time.str)!'未填写'}</option>
                                    </#list>
                                </#if>
                            </select>
                            <!--<input type="text" class="am-input-sm" name="pxlmWxNews.name" value="${(info.name)!''}">-->
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            内容
                        </div>
                        <div class="am-u-sm-8 am-u-md-4 am-u-end">
                            <textarea id="editor_id" name="pxlmWxNews.content" cols="100" rows="8">${(info.content)!''}</textarea>
                        </div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">
                            <button type="submit" class="am-btn am-btn-primary am-btn-xs">提交保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <!-- content end -->

    </div>
</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
   data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<footer>
    <hr>
    <p class="am-padding-left">${footer}</p>
</footer>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="/assets/js/amazeui.min.js"></script>
<script src="/assets/js/app.js"></script>
<script src="/cjwJs/uploadimage.js"></script>
<script src="/layer/layer.js"></script>
<script>

    function selectImage(){
        layer.open({
            type: 2,
            area: ['700px', '530px'],
            fix: false, //不固定
            maxmin: true,
            skin: 'layui-layer-rim',
//            title: false,
//            closeBtn: 0,
            content: 'images'
        });

        return false;
    }

//    $('#coverSelection').on('click', function(){
////        layer.msg('Hello layer');
//
//        layer.open({
//            type: 2,
//            area: ['700px', '530px'],
//            fix: false, //不固定
//            maxmin: true,
//            skin: 'layui-layer-rim',
////            title: false,
////            closeBtn: 0,
//            content: 'images'
//        });
//    });

    $('#test2').on('click', function(){
        var index = parent.layer.getFrameIndex(window.name);
        parent.$('#test1').text('我被改变了');
        parent.layer.tips('Look here', '#parentIframe', {time: 5000});
        parent.layer.close(index);
    });

</script>
</body>
</html>
